<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./template.xhtml">
            <ui:define name="mainMenu">
                <ui:include src="mainMenu.xhtml">
                    <ui:param name="select" value="#{3}"/>
                </ui:include>
            </ui:define>
            <ui:define name="navigation">
                <ui:include src="menu.xhtml"/>
            </ui:define>
            <ui:define name="content">
                <h1>
                    <h:outputText value="#{bundle.FAllFilms}" />
                </h1>
                <h:dataTable value="#{allFilmsBean.myfilms}" var="mf"
                             styleClass="order-table"
    			headerClass="order-table-header"
    			rowClasses="order-table-odd-row,order-table-even-row"
>
                    <h:column>
                        <f:facet name="header">#{bundle.FTitleOrg}</f:facet>

                        <h:link styleClass="tableLink" value="#{mf.titleOrg}" outcome="filmpage" >
                            <f:param name="id" value="#{mf.idfilms}" />
                        </h:link>

                    </h:column>
                    <h:column>
                        <f:facet name="header">#{bundle.FTitleEn}</f:facet>
                        #{mf.titleEn}
                    </h:column>

                    <h:column>
                        <f:facet name="header">#{bundle.FTitlePl}</f:facet>
                        #{mf.titlePl}
                    </h:column>
                    <h:column>
                        <f:facet name="header">#{bundle.FUser}</f:facet>
                        #{mf.users.username}
                    </h:column>
                    <h:column>
                        <f:facet name="header">#{bundle.FQuality}</f:facet>
                        #{mf.quality.name}
                    </h:column>
                    <h:column>
                        <f:facet name="header">#{bundle.FFilmSize}</f:facet>
                        #{mf.fileSize}
                    </h:column>
                    <h:column>
                        <f:facet name="header">#{bundle.FYear}</f:facet>
                        #{mf.year}
                    </h:column>

                </h:dataTable>
            </ui:define>
        </ui:composition>
    </body>
</html>